package main.java.com.jiao;

/**
 * 选择排序
 */
public class SelectorSort {
    public static void sort(int [] arr){
        for (int i = 0;i < arr.length;i++){
            for (int j = i + 1; j< arr.length; j++){
                if (arr[j] < arr[i]){
                    int min = arr [i];
                    arr[i] = arr[j];
                    arr[j] = min;
                }
            }
        }
    }
}
